<template>
	<view>
		<!-- 不带参数，带不带（）都可以 -->
		<button @click="onLog()" type="primary">console.log</button>
		<button @click="onDebug()">console.debug</button>
		<!-- 带数据的 -->
		<button @click="onInfo()">console.info</button>
		<button @click="onWarm()" type="warn">console.warm</button>
		<button @click="onError()">console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'打印日志'
			}
		},
		methods: {
			onLog(){
				console.log("onLog()--->"+this.title)
				// clog
				console.log("clog");
				// clogv
				console.log('this.title: ',this.title);
			},
			onWarm(){
				if(name==='yyx'){
					console.log("登陆成功");
				}else{
					console.warn("this is a warm log");
				}
			},
			onError(){
				console.error("this is a error message");
				try{
					
				}catch(e){
					console.error("catch",e)
				}
			}
		}
	}
</script>

<style>

</style>
